﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Abp.Domain.Entities.Auditing;
using FwProject.Authorization.Users;
using FwProject.Core.Restaurant;
using System.ComponentModel.DataAnnotations;
namespace FwProject.PrePaymentInfo
{
    /// <summary>
    /// 预收款
    /// </summary>
    [Table("PrePaymentInfo")]  
    public class PrePaymentInfoModel : FullAuditedEntity<Guid>
    {

        /// <summary>
        /// 所属工厂
        /// </summary>
        [Display(Name = "所属工厂")]
        public Guid FactoryinfoId { get; set; }
        public string PrePaymentInfoNumber { get; set; }
        /// <summary>
        /// 账户编号
        /// </summary>
        [Required]
        public Guid CapitalAccountId { get; set; }
        /// <summary>
        /// 账号
        /// </summary>
        public string AccountNo { get; set; }
        /// <summary>
        /// 账户名称
        /// </summary>
        [Required]
        public string AccountName { get; set; }
        /// <summary>
        /// 经办人ID
        /// </summary>
        [Required]
        public long AgentPeoperUserId { get; set; }
        /// <summary>
        /// 经办人姓名
        /// </summary>
        [Required]
        public string AgentPeoper { get; set; }
        /// <summary>
        /// 餐厅名称
        /// </summary>
        [Required]
        public string RestaurantInfoName { get; set; }
        /// <summary>
        /// 餐厅编号
        /// </summary>
        public Guid RestaurantInfoId { get; set; }
        /// <summary>
        /// 收退金额
        /// </summary>
        [Required]
        public decimal PrePaymentPrice { get; set; } = 0.0m;

        /// <summary>
        /// 退还前的余额
        /// </summary>
        public decimal PreviousPrice { get; set; } = 0m;
        /// <summary>
        /// 备注
        /// </summary>
        public string RemarkContent { get; set; }
        /// <summary>
        /// 收退类型
        /// </summary>
        public PrePaymentInfoType PrePaymentInfoType { get; set; } = PrePaymentInfoType.收预交金;

        public PrePaymentInfoStatus PrePaymentInfoStatus { get; set; } = PrePaymentInfoStatus.未提交;
    }
    public enum PrePaymentInfoType
    {
        收预交金 = 0,
        退预交金= 1
    }
    public enum PrePaymentInfoStatus
    {
        未提交 = 0,
        已提交 = 1,
        已审核 = 2,
        退回 = 3
    }
}
